import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))

from langserve import RemoteRunnable
from config_reader import get_client_config

if __name__ == '__main__':
    # 获取客户端配置
    client_config = get_client_config()
    
    # 构建完整的服务器URL
    server_url = f"{client_config['server_url']}{client_config['chain_path']}"
    
    client = RemoteRunnable(server_url)
    print(client.invoke({'language': 'italian', 'text': '你好！'}))